Click here to return to the VHDL Reference Guide. (last edit: 24. september 2012)

Physical

A physical type represents an integer value together with a physical unit.

Syntax

  type NewName is range Range                 {static integer range}
    units
      PrimaryUnitName;
      SecondaryUnitName = PhysicalLiteral;
      SecondaryUnitName = PhysicalLiteral;
      ... ;
    end units [NewName];

  PhysicalLiteral = Number UnitName
    

Where

See Declaration

Synthesis

Not synthesizable.

Tips

The only commonly used physical type is TIME. You are unlikely to need to define new physical types.

Example

  type Distance is range 0 to INTEGER'HIGH
    units 
      micron;
      millimetre = 1000 micron;
      centimetre = 10 millimetre;
      metre = 100 centimetre;
    end units;
    

See Also

Type, Integer, Range